#ifndef RCMAEMO5QTPROJECTGENERATOR_H
#define RCMAEMO5QTPROJECTGENERATOR_H

#include "maemo5/maemo5qtprojectgenerator.h"

class RcBuildTask;

class RcMaemo5QtProjectGenerator : public Maemo5QtProjectGenerator
{

    Q_OBJECT

public:
    //
    // lifetime management
    //
    RcMaemo5QtProjectGenerator(const QString       & platformId,
                               GeneratorOutputView & outputView,
                               QObject             * parent = NULL);
    virtual ~RcMaemo5QtProjectGenerator();

    //
    // public operators
    //
public:
    virtual IStatusUpdater * createStatusUpdater(QObject * parent = NULL);
    virtual void build(const QString &widgetFile,
                       RcSession     & rcSession);
    virtual void rebuild(RcSession     & rcSession);
    virtual QString getStatusText() const;
    virtual QWidget * createSettingsWidget(const QString & widgetFile,
                                           QWidget       * parent = NULL) const;
    virtual void saveSettings(QWidget * settingsWidget) const;
    virtual QStringList errorsForTarget(GeneratorTarget generatorTarget) const;

    /* OBS
protected:
    virtual Maemo5ProcessRunner * createProcessRunner();
    */

protected:
    virtual void startBuild();

private slots:
    void zippingSlot();
    void uploadingAndWaitingSlot();
    void downloadingSlot();
    void buildCompletedSlot(bool    success,
                            QString downloadedFile);


private:
    QString              m_wccParams;
    RcSession          * m_rcSession;
    RcBuildTask        * m_rcBuildTask;

};

#endif // RCMAEMO5QTPROJECTGENERATOR_H
